<?php
session_start();

?>
<html>
<head>

<script language="javascript">
<!--
function header()
{
location.replace("access-denied.php")//-->
}
</script>

<title>::.::.:: APPMA ::.::.::</title></head>
<body>
<?php
	//Start session
	//session_start();
		  

	//Check whether the session variable SESS_MEMBER_ID is present or not
	if(!isset($_SESSION['SESS_MEMBER_ID']) || (trim($_SESSION['SESS_MEMBER_ID']) == '')) {
	echo '<script language=javascript>header();</script>';
//		header("location: access-denied.php");
		exit();
	}
	
	if ($_SESSION['type'] != 'admin')
	{
		echo '<script language=javascript>header();</script>';
//		header("location: access-denied.php");
		exit();

	}
?>
</body>
</html>